# -*- coding: utf-8 -*-
import os
from MsgProcess import MsgProcess, MsgType

class CloseMic(MsgProcess):

    def Text(self, message):  
        
        data=message["Data"]
        if "启动" in data:
            os.system("amixer set Capture cap")
            os.system("sudo amixer set Capture 70%")
            self.say("麦克风已打开")
        else:
            os.system("amixer set Capture nocap")
            self.say("麦克风已关闭")

        self.Stop() 

